package com.jackstraw.jack_base.datasource.elasticsearch.service.impl;


import co.elastic.clients.elasticsearch.ElasticsearchAsyncClient;
import co.elastic.clients.elasticsearch.ElasticsearchClient;
import com.jackstraw.jack_base.datasource.common.aspect.annotation.DataSourceNameCut;
import com.jackstraw.jack_base.datasource.common.entity.enums.DataSourceTypeEnum;
import com.jackstraw.jack_base.datasource.elasticsearch.entity.bean.ElasticSearchRouting;
import com.jackstraw.jack_base.datasource.elasticsearch.entity.Product;
import com.jackstraw.jack_base.datasource.elasticsearch.repository.ProductElasticsearchRepository;
import com.jackstraw.jack_base.datasource.elasticsearch.service.ProductElasticSearchService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;


@DataSourceNameCut(dataSourceTypeEnum = DataSourceTypeEnum.elasticsearch, dataSourceName = "elasticsearchName2")
public class OtherProductElasticSearchServiceImpl
        extends DefaultElasticSearchServiceImpl<OtherProductElasticSearchServiceImpl, Product, ProductElasticsearchRepository>
        implements ProductElasticSearchService {


    public OtherProductElasticSearchServiceImpl(ElasticSearchRouting elasticSearchRouting) {
        super(elasticSearchRouting);
    }

    @Override
    public ElasticsearchClient elasticsearchClient() {
        return super.elasticsearchClient();
    }

    @Override
    public ElasticsearchAsyncClient elasticsearchAsyncClient() {
        return super.elasticsearchAsyncClient();
    }

    @Override
    public Boolean createIndex() {
        return super.createIndex();
    }

    @Override
    public Boolean existsIndex() {
        return super.existsIndex();
    }

    @Override
    public Boolean deleteIndex() {
        return super.deleteIndex();
    }

    @Override
    public Product save(Product product) {
        return super.save(product);
    }

    @Override
    public List<Product> saveAll(List<Product> products) {
        return super.saveAll(products);
    }

    @Override
    public Product update(Product product) {
        return super.update(product);
    }

    @Override
    public List<Product> updateAll(List<Product> products) {
        return super.updateAll(products);
    }

    @Override
    public List<Product> findAll() {
        return super.findAll();
    }

    @Override
    public List<Product> findAll(Sort sort) {
        return super.findAll(sort);
    }

    @Override
    public Page<Product> findAll(Pageable pageable) {
        return super.findAll(pageable);
    }

    @Override
    public List<Product> findAllById(Iterable<String> ids) {
        return super.findAllById(ids);
    }

    @Override
    public Product findById(String id) {
        return super.findById(id);
    }

    @Override
    public void delete(Product entity) {
        super.delete(entity);
    }

    @Override
    public void deleteAll() {
        super.deleteAll();
    }

    @Override
    public void deleteById(String id) {
        super.deleteById(id);
    }

    @Override
    public void deleteAllById(Iterable<String> ids) {
        super.deleteAllById(ids);
    }

    @Override
    public void deleteAll(Iterable<? extends Product> entities) {
        super.deleteAll(entities);
    }

    @Override
    public Boolean existsById(String id) {
        return super.existsById(id);
    }

    @Override
    public Long count() {
        return super.count();
    }

    @Override
    public Page<Product> searchSimilar(Product entity, String[] fields, Pageable pageable) {
        return super.searchSimilar(entity, fields, pageable);
    }

    @Override
    public List<Product> search(Product entity) {
        return super.search(entity);
    }
}
